<#include "../common/header.htm">
<div id="hidebox" style="height:100%;width:100%">
    <div class="box-body table-responsive">
        <!--<span id="spantitle" class="title"></span>-->
        <form id="caseManageform" method="post" class="form-horizontal" >
            <div class="form-group">
                <label for="caseTime" class="col-sm-3 control-label">案发时间：</label>
                <div class="col-sm-6 casetypec" id="caseTime" >
                </div>
            </div>
            <div class="form-group">
                <label for="caseAddress" class="col-sm-3 control-label">案发辖区：</label>
                <div class="col-sm-8 casetypec" id="caseAddress">
                </div>
            </div>
            <div class="form-group">
                <label for="caseType" class="col-sm-3 control-label">案件类型：</label>
                <div class="col-sm-8 casetypec" id="caseType">
                </div>
            </div>
            <div class="form-group">
                <label for="caseName" class="col-sm-3 control-label">案件名称：</label>
                <div class="col-sm-8 casetypec" id="caseName">
                </div>
            </div>
            <div class="form-group">
                <label for="casePerson" class="col-sm-3 control-label">涉案人员类型：</label>
                <div class="col-sm-8 casetypec" id="casePerson">
                </div>
            </div>
            <div class="form-group">
                <label for="personName" class="col-sm-3 control-label">涉案人员姓名：</label>
                <div class="col-sm-6 casetypec" id="personName">
                </div>
            </div>
            <div class="form-group">
                <label for="caseAuthority" class="col-sm-3 control-label">案件权限：</label>
                <div class="col-sm-8 casetypec" id="caseAuthority">
                </div>
            </div>
            <div class="form-group">
                <label for="caseRemark" class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8 casetypec" id="caseRemark">
                </div>
            </div>
        </form>
    </div>
</div>
<script>
    $(function() {
        /** 回去传值 **/
        var dialog = top.dialog.get(window);
        var params = dialog.data; // 获取对话框传递过来的数据
        if (params){
            $.ajax({
                url:'${ctx}/casemanage/'+params,
                type: 'get',
                dataType:'json',
                success:function (obj) {
                    $.ajax({
                        url: '${ctx}/persontype/allpersontype',
                        type: 'get',
                        dataType:'json',
                        success:function (pdata) {
                            var htm = '';
                            $.each(pdata,function (i,n) {
                                if (obj.data.person_type==n.id) {
                                	$("#casePerson").text(n.personType);
                                }
                            })
                        }
                    });
                    $.ajax({
                        url: '${ctx}/casetype/allcasetype',
                        type: 'get',
                        async:false,
                        dataType:'json',
                        success:function (adata) {
                            var htm = '';
                            $.each(adata,function (i,n) {
                                if (obj.data.case_type==n.id) {
                                	console.log(n);
                                	$("#caseType").text(n.typeName);
                                }
                            })
                        }
                    });
                    var curr_time = new Date(obj.data.case_time);
                    curr_time = formatDate(curr_time, 'yyyy-MM-dd hh:mm:ss')
                    $('#caseTime').text(curr_time);
                    $('#caseAddress').text(obj.data.case_region);
                    $('#caseName').text(obj.data.case_name);
                    $('#personName').text(obj.data.case_victim);
                    $('#caseRemark').text(obj.data.case_remark);
                    $('#caseAuthority').text(obj.data.case_authority == '1' ? "私有" : "公开");
                }
            })
        } 
    });


</script>
<style>
    sapn.caseperfen {
        margin-left: 25px;
        height: 34px;
        line-height: 34px;
    }
    .col-sm-8{
        padding-left: 0;
    }
    .col-sm-6{
        padding-left: 0;
    }
    .casetypec{
        margin-top: 5px;
    }
    .form-group {
        margin-bottom: 25px;
    }
    span.casestar {
        color: red;
        font-size: 18px;
        position: absolute;
        right: 86px;
        top: 8px;
        font-weight: 900;
    }
    label.col-sm-3.control-label {
        font-weight: normal;
        color: #000;
    }
    .box-body {
        margin-top: 30px;
    }
    .box-body.table-responsive {
        height: 100%;
    }
    .fixed-table-pagination {
        margin-top: 15px;
    }
    .form-control {
         width: 666px;
         height: 34px;
        line-height: 25px;
        background: #fff;
        border-color: #d9d9d9;
        border-radius: 4px;
    }
</style>
</body>
</html>
